/*
 * types.h
 *
 *  Created on: 2009/01/05
 *      Author: Yongshik Cho
 */

#ifndef TYPES_H_
#define TYPES_H_

#include "sqplus/sqplus.h"
using namespace SqPlus;

//define types
typedef char			int8;
typedef unsigned char	uint8;
typedef short			int16;
typedef unsigned short	uint16;
typedef int				int32;
typedef unsigned int	uint32;


#ifndef SAFE_DELETE
#	define SAFE_DELETE(p) { if(p) {delete (p); (p) = 0; } }
#endif

#ifndef SAFE_DELETE_ARRAY
#	define SAFE_DELETE_ARRAY(p) { if(p) {delete [] (p); (p) = 0; } }
#endif

#ifndef SAFE_RELEASE
#	define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p) = 0; } }
#endif

//define String
#include <string>
#ifdef UNICODE
	typedef std::wstring _StringBase;
#else
	typedef std::string _StringBase;
#endif

typedef _StringBase String;


#endif /* TYPES_H_ */
